

<%@ page import="les.Equipe" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'equipe.label', default: 'Equipe')}" />
        <title>Criar Equipe</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Inicio</a></span>
            <g:if test="${session.usuarioLogado?.tipo == 'Jota'}">
            	<span class="menuButton"><g:link class="list" action="list">Listar Equipes</g:link></span>
            </g:if>
        </div>
        <div class="body">
            <h1>Criar Equipe</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${equipeInstance}">
            <div class="errors">
                <g:renderErrors bean="${equipeInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form action="save" >
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="nome"><g:message code="equipe.nome.label" default="Nome" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: equipeInstance, field: 'nome', 'errors')}">
                                    <g:textField name="nome" value="${equipeInstance?.nome}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="corDoCracha"><g:message code="equipe.corDoCracha.label" default="Cor Do Cracha" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: equipeInstance, field: 'corDoCracha', 'errors')}">
                                    <g:select name="corDoCracha" from="${equipeInstance.constraints.corDoCracha.inList}" value="${equipeInstance?.corDoCracha}" valueMessagePrefix="equipe.corDoCracha"  />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="encontro"><g:message code="equipe.encontro.label" default="Encontro" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: equipeInstance, field: 'encontro', 'errors')}">
                                    <g:select name="encontro.id" from="${les.Encontro.list()}" optionKey="id" value="${equipeInstance?.encontro?.id}"  />
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:submitButton name="create" class="save" value="Criar" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
